<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>GraphChi: graphlab::icontext&lt; GraphType, GatherType, MessageType &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">GraphChi
   &#160;<span id="projectnumber">0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>graphlab</b></li><li class="navelem"><a class="el" href="classgraphlab_1_1icontext.html">icontext</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a>  </div>
  <div class="headertitle">
<div class="title">graphlab::icontext&lt; GraphType, GatherType, MessageType &gt; Class Template Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a href="classgraphlab_1_1icontext-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:adeea37e06c012067a2ec57cd0d14cbac"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adeea37e06c012067a2ec57cd0d14cbac"></a>
typedef GraphType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgraphlab_1_1icontext.html#adeea37e06c012067a2ec57cd0d14cbac">graph_type</a></td></tr>
<tr class="memdesc:adeea37e06c012067a2ec57cd0d14cbac"><td class="mdescLeft">&#160;</td><td class="mdescRight">the user graph type (typically <a class="el" href="structgraphlab_1_1distributed__graph.html">distributed_graph</a>) <br/></td></tr>
<tr class="memitem:a16c26ddb8bbbef6c0aa62fcbb1d8157d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a16c26ddb8bbbef6c0aa62fcbb1d8157d"></a>
typedef <a class="el" href="structgraphlab_1_1_graph_lab_vertex_wrapper.html">graph_type::vertex_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgraphlab_1_1icontext.html#a16c26ddb8bbbef6c0aa62fcbb1d8157d">vertex_type</a></td></tr>
<tr class="memdesc:a16c26ddb8bbbef6c0aa62fcbb1d8157d"><td class="mdescLeft">&#160;</td><td class="mdescRight">the opaque vertex_type defined in the ivertex_program::graph_type (typically distributed_graph::vertex_type) <br/></td></tr>
<tr class="memitem:a1a1817b36be531195eb5bf374cc393ce"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1a1817b36be531195eb5bf374cc393ce"></a>
typedef graph_type::vertex_id_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgraphlab_1_1icontext.html#a1a1817b36be531195eb5bf374cc393ce">vertex_id_type</a></td></tr>
<tr class="memdesc:a1a1817b36be531195eb5bf374cc393ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">the global vertex identifier (see graphlab::vertex_id_type). <br/></td></tr>
<tr class="memitem:a64f23efbbf13a9421b8efada6966643b"><td class="memItemLeft" align="right" valign="top">typedef MessageType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgraphlab_1_1icontext.html#a64f23efbbf13a9421b8efada6966643b">message_type</a></td></tr>
<tr class="memitem:ae1699cad574dda8cdb91d639a9c82d9e"><td class="memItemLeft" align="right" valign="top">typedef GatherType&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgraphlab_1_1icontext.html#ae1699cad574dda8cdb91d639a9c82d9e">gather_type</a></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a542e6db4aa9f6d6796f16f3b417ae0f5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a542e6db4aa9f6d6796f16f3b417ae0f5"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>icontext</b> (<a class="el" href="structgraphchi_1_1graphchi__context.html">graphchi_context</a> *gcontext)</td></tr>
<tr class="memitem:a8939d5bec338e978f8892ec8d4e1d7eb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8939d5bec338e978f8892ec8d4e1d7eb"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgraphlab_1_1icontext.html#a8939d5bec338e978f8892ec8d4e1d7eb">~icontext</a> ()</td></tr>
<tr class="memdesc:a8939d5bec338e978f8892ec8d4e1d7eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">icontext destructor <br/></td></tr>
<tr class="memitem:a31f6e5cc044621a104c995a3a30d581e"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgraphlab_1_1icontext.html#a31f6e5cc044621a104c995a3a30d581e">num_vertices</a> () const </td></tr>
<tr class="memdesc:a31f6e5cc044621a104c995a3a30d581e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the total number of vertices in the graph.  <a href="#a31f6e5cc044621a104c995a3a30d581e"></a><br/></td></tr>
<tr class="memitem:af556d0f00636857364bf8906cc9a7b8a"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgraphlab_1_1icontext.html#af556d0f00636857364bf8906cc9a7b8a">num_edges</a> () const </td></tr>
<tr class="memdesc:af556d0f00636857364bf8906cc9a7b8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of edges in the graph.  <a href="#af556d0f00636857364bf8906cc9a7b8a"></a><br/></td></tr>
<tr class="memitem:ab57348d56fb08bd10f3edbccc4137cb1"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgraphlab_1_1icontext.html#ab57348d56fb08bd10f3edbccc4137cb1">procid</a> () const </td></tr>
<tr class="memdesc:ab57348d56fb08bd10f3edbccc4137cb1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the id of this process.  <a href="#ab57348d56fb08bd10f3edbccc4137cb1"></a><br/></td></tr>
<tr class="memitem:a7f827dd93aba5809b69cf659554f8869"><td class="memItemLeft" align="right" valign="top">virtual std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgraphlab_1_1icontext.html#a7f827dd93aba5809b69cf659554f8869">cout</a> () const </td></tr>
<tr class="memdesc:a7f827dd93aba5809b69cf659554f8869"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a standard output object (like cout) which only prints once even when running distributed.  <a href="#a7f827dd93aba5809b69cf659554f8869"></a><br/></td></tr>
<tr class="memitem:a9f7cbf4f381fa287ae2ebfc7ee356810"><td class="memItemLeft" align="right" valign="top">virtual std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgraphlab_1_1icontext.html#a9f7cbf4f381fa287ae2ebfc7ee356810">cerr</a> () const </td></tr>
<tr class="memdesc:a9f7cbf4f381fa287ae2ebfc7ee356810"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a standard error object (like cerr) which only prints once even when running distributed.  <a href="#a9f7cbf4f381fa287ae2ebfc7ee356810"></a><br/></td></tr>
<tr class="memitem:a67622ed912bfb1bba05b3579b0d1486f"><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgraphlab_1_1icontext.html#a67622ed912bfb1bba05b3579b0d1486f">num_procs</a> () const </td></tr>
<tr class="memdesc:a67622ed912bfb1bba05b3579b0d1486f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of processes in the current execution.  <a href="#a67622ed912bfb1bba05b3579b0d1486f"></a><br/></td></tr>
<tr class="memitem:a863010fd33f3721162d253af3583f8bb"><td class="memItemLeft" align="right" valign="top">virtual float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgraphlab_1_1icontext.html#a863010fd33f3721162d253af3583f8bb">elapsed_seconds</a> () const </td></tr>
<tr class="memdesc:a863010fd33f3721162d253af3583f8bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the elapsed time in seconds since start was called.  <a href="#a863010fd33f3721162d253af3583f8bb"></a><br/></td></tr>
<tr class="memitem:a29496c1e0434d716726ac2a703c81f32"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgraphlab_1_1icontext.html#a29496c1e0434d716726ac2a703c81f32">iteration</a> () const </td></tr>
<tr class="memdesc:a29496c1e0434d716726ac2a703c81f32"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the current interation number (if supported).  <a href="#a29496c1e0434d716726ac2a703c81f32"></a><br/></td></tr>
<tr class="memitem:a3d9adafb629c9560a8cdb80f94a2583d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgraphlab_1_1icontext.html#a3d9adafb629c9560a8cdb80f94a2583d">stop</a> ()</td></tr>
<tr class="memdesc:a3d9adafb629c9560a8cdb80f94a2583d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signal the engine to stop executing additional update functions.  <a href="#a3d9adafb629c9560a8cdb80f94a2583d"></a><br/></td></tr>
<tr class="memitem:ab1b5ca81e1c7665a98f4cad04fb0819d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgraphlab_1_1icontext.html#ab1b5ca81e1c7665a98f4cad04fb0819d">signal</a> (const <a class="el" href="classgraphlab_1_1icontext.html#a16c26ddb8bbbef6c0aa62fcbb1d8157d">vertex_type</a> &amp;vertex, const <a class="el" href="classgraphlab_1_1icontext.html#a64f23efbbf13a9421b8efada6966643b">message_type</a> &amp;<a class="el" href="structmessage.html">message</a>=<a class="el" href="classgraphlab_1_1icontext.html#a64f23efbbf13a9421b8efada6966643b">message_type</a>())</td></tr>
<tr class="memdesc:ab1b5ca81e1c7665a98f4cad04fb0819d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Signal a vertex with a particular message.  <a href="#ab1b5ca81e1c7665a98f4cad04fb0819d"></a><br/></td></tr>
<tr class="memitem:a210bf29be5d4216dfda2591aaf42df73"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgraphlab_1_1icontext.html#a210bf29be5d4216dfda2591aaf42df73">signal_vid</a> (<a class="el" href="classgraphlab_1_1icontext.html#a1a1817b36be531195eb5bf374cc393ce">vertex_id_type</a> gvid, const <a class="el" href="classgraphlab_1_1icontext.html#a64f23efbbf13a9421b8efada6966643b">message_type</a> &amp;<a class="el" href="structmessage.html">message</a>=<a class="el" href="classgraphlab_1_1icontext.html#a64f23efbbf13a9421b8efada6966643b">message_type</a>())</td></tr>
<tr class="memdesc:a210bf29be5d4216dfda2591aaf42df73"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send a message to a vertex ID.  <a href="#a210bf29be5d4216dfda2591aaf42df73"></a><br/></td></tr>
<tr class="memitem:a9c85c9b34ae08d72a28ca5e698a34482"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgraphlab_1_1icontext.html#a9c85c9b34ae08d72a28ca5e698a34482">post_delta</a> (const <a class="el" href="classgraphlab_1_1icontext.html#a16c26ddb8bbbef6c0aa62fcbb1d8157d">vertex_type</a> &amp;vertex, const <a class="el" href="classgraphlab_1_1icontext.html#ae1699cad574dda8cdb91d639a9c82d9e">gather_type</a> &amp;delta)</td></tr>
<tr class="memdesc:a9c85c9b34ae08d72a28ca5e698a34482"><td class="mdescLeft">&#160;</td><td class="mdescRight">Post a change to the cached sum for the vertex.  <a href="#a9c85c9b34ae08d72a28ca5e698a34482"></a><br/></td></tr>
<tr class="memitem:a9f7c49ee6b4a59be90ae65841597bd5b"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgraphlab_1_1icontext.html#a9f7c49ee6b4a59be90ae65841597bd5b">clear_gather_cache</a> (const <a class="el" href="classgraphlab_1_1icontext.html#a16c26ddb8bbbef6c0aa62fcbb1d8157d">vertex_type</a> &amp;vertex)</td></tr>
<tr class="memdesc:a9f7c49ee6b4a59be90ae65841597bd5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Invalidate the cached gather on the vertex.  <a href="#a9f7c49ee6b4a59be90ae65841597bd5b"></a><br/></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:accc79d40e32b01d5f77b6eb0ea6f3d07"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="accc79d40e32b01d5f77b6eb0ea6f3d07"></a>
<a class="el" href="structgraphchi_1_1graphchi__context.html">graphchi_context</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>gcontext</b></td></tr>
</table>
<hr/><h2>Member Typedef Documentation</h2>
<a class="anchor" id="ae1699cad574dda8cdb91d639a9c82d9e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename GraphType, typename GatherType, typename MessageType&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef GatherType <a class="el" href="classgraphlab_1_1icontext.html">graphlab::icontext</a>&lt; GraphType, GatherType, MessageType &gt;::<a class="el" href="classgraphlab_1_1icontext.html#ae1699cad574dda8cdb91d639a9c82d9e">gather_type</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The type returned by the gather operation. (see ivertex_program::gather_type) </p>

</div>
</div>
<a class="anchor" id="a64f23efbbf13a9421b8efada6966643b"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename GraphType, typename GatherType, typename MessageType&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef MessageType <a class="el" href="classgraphlab_1_1icontext.html">graphlab::icontext</a>&lt; GraphType, GatherType, MessageType &gt;::<a class="el" href="classgraphlab_1_1icontext.html#a64f23efbbf13a9421b8efada6966643b">message_type</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The message type specified by the user-defined vertex-program. (see ivertex_program::message_type) </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a9f7cbf4f381fa287ae2ebfc7ee356810"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename GraphType, typename GatherType, typename MessageType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::ostream&amp; <a class="el" href="classgraphlab_1_1icontext.html">graphlab::icontext</a>&lt; GraphType, GatherType, MessageType &gt;::cerr </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns a standard error object (like cerr) which only prints once even when running distributed. </p>
<p>This returns a C++ standard output stream object which maps directly to std::cerr on machine with process ID 0, and to empty output streamss on all other processes. Calling, </p>
<div class="fragment"><div class="line">             context.cerr() &lt;&lt; <span class="stringliteral">&quot;Hello World!&quot;</span>;</div>
</div><!-- fragment --><p> will therefore only print if the code is run on machine 0. This is useful in the finalize operation in aggregators. </p>

</div>
</div>
<a class="anchor" id="a9f7c49ee6b4a59be90ae65841597bd5b"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename GraphType, typename GatherType, typename MessageType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classgraphlab_1_1icontext.html">graphlab::icontext</a>&lt; GraphType, GatherType, MessageType &gt;::clear_gather_cache </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgraphlab_1_1icontext.html#a16c26ddb8bbbef6c0aa62fcbb1d8157d">vertex_type</a> &amp;&#160;</td>
          <td class="paramname"><em>vertex</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Invalidate the cached gather on the vertex. </p>
<p>When caching is enabled clear_gather_cache clears the cache entry forcing a complete invocation of the subsequent gather.</p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">vertex</td><td>[in] the vertex whose cache to clear. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a7f827dd93aba5809b69cf659554f8869"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename GraphType, typename GatherType, typename MessageType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual std::ostream&amp; <a class="el" href="classgraphlab_1_1icontext.html">graphlab::icontext</a>&lt; GraphType, GatherType, MessageType &gt;::cout </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns a standard output object (like cout) which only prints once even when running distributed. </p>
<p>This returns a C++ standard output stream object which maps directly to std::cout on machine with process ID 0, and to empty output streamss on all other processes. Calling, </p>
<div class="fragment"><div class="line">             context.cout() &lt;&lt; <span class="stringliteral">&quot;Hello World!&quot;</span>;</div>
</div><!-- fragment --><p> will therefore only print if the code is run on machine 0. This is useful in the finalize operation in aggregators. </p>

</div>
</div>
<a class="anchor" id="a863010fd33f3721162d253af3583f8bb"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename GraphType, typename GatherType, typename MessageType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual float <a class="el" href="classgraphlab_1_1icontext.html">graphlab::icontext</a>&lt; GraphType, GatherType, MessageType &gt;::elapsed_seconds </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the elapsed time in seconds since start was called. </p>
<dl class="section return"><dt>Returns:</dt><dd>runtine in seconds </dd></dl>

</div>
</div>
<a class="anchor" id="a29496c1e0434d716726ac2a703c81f32"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename GraphType, typename GatherType, typename MessageType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int <a class="el" href="classgraphlab_1_1icontext.html">graphlab::icontext</a>&lt; GraphType, GatherType, MessageType &gt;::iteration </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the current interation number (if supported). </p>
<dl class="section return"><dt>Returns:</dt><dd>the current interation number if support or -1 otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="af556d0f00636857364bf8906cc9a7b8a"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename GraphType, typename GatherType, typename MessageType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t <a class="el" href="classgraphlab_1_1icontext.html">graphlab::icontext</a>&lt; GraphType, GatherType, MessageType &gt;::num_edges </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the number of edges in the graph. </p>
<p>Each direction counts as a separate edge.</p>
<dl class="section return"><dt>Returns:</dt><dd>the total number of edges in the entire graph. </dd></dl>

</div>
</div>
<a class="anchor" id="a67622ed912bfb1bba05b3579b0d1486f"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename GraphType, typename GatherType, typename MessageType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t <a class="el" href="classgraphlab_1_1icontext.html">graphlab::icontext</a>&lt; GraphType, GatherType, MessageType &gt;::num_procs </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the number of processes in the current execution. </p>
<p>This is typically the number of mpi jobs created: </p>
<div class="fragment"><div class="line">           %&gt; mpiexec -n 16 ./pagerank</div>
</div><!-- fragment --><p> would imply that <a class="el" href="classgraphlab_1_1icontext.html#a67622ed912bfb1bba05b3579b0d1486f" title="Get the number of processes in the current execution.">num_procs()</a> returns 16.</p>
<dl class="section return"><dt>Returns:</dt><dd>the number of processes in the current execution </dd></dl>

</div>
</div>
<a class="anchor" id="a31f6e5cc044621a104c995a3a30d581e"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename GraphType, typename GatherType, typename MessageType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t <a class="el" href="classgraphlab_1_1icontext.html">graphlab::icontext</a>&lt; GraphType, GatherType, MessageType &gt;::num_vertices </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the total number of vertices in the graph. </p>
<dl class="section return"><dt>Returns:</dt><dd>the total number of vertices in the entire graph. </dd></dl>

</div>
</div>
<a class="anchor" id="a9c85c9b34ae08d72a28ca5e698a34482"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename GraphType, typename GatherType, typename MessageType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classgraphlab_1_1icontext.html">graphlab::icontext</a>&lt; GraphType, GatherType, MessageType &gt;::post_delta </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgraphlab_1_1icontext.html#a16c26ddb8bbbef6c0aa62fcbb1d8157d">vertex_type</a> &amp;&#160;</td>
          <td class="paramname"><em>vertex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classgraphlab_1_1icontext.html#ae1699cad574dda8cdb91d639a9c82d9e">gather_type</a> &amp;&#160;</td>
          <td class="paramname"><em>delta</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Post a change to the cached sum for the vertex. </p>
<p>Often a vertex program will be signaled due to a change in one or a few of its neighbors. However the gather operation will be rerun on all neighbors potentially producing the same value as previous invocations and wasting computation time. To address this some engines support caching (see gather_caching for details) of the gather phase.</p>
<p>When caching is enabled the engines save a copy of the previous gather for each vertex. On subsequent calls to gather if their is a cached gather then the gather phase is skipped and the cached value is passed to the <a class="el" href="structgraphlab_1_1ivertex__program.html#ad1f9db9ebc638f6a9aa22014e8db1854">ivertex_program::apply</a> function. Therefore it is the responsibility of the vertex program to update the cache values for neighboring vertices. This is accomplished by using the <a class="el" href="classgraphlab_1_1icontext.html#a9c85c9b34ae08d72a28ca5e698a34482" title="Post a change to the cached sum for the vertex.">icontext::post_delta</a> function. Posted deltas are atomically added to the cache.</p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">vertex</td><td>[in] the vertex whose cache we want to update </td></tr>
    <tr><td class="paramname">delta</td><td>[in] the change that we want to <em>add</em> to the current cache. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ab57348d56fb08bd10f3edbccc4137cb1"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename GraphType, typename GatherType, typename MessageType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t <a class="el" href="classgraphlab_1_1icontext.html">graphlab::icontext</a>&lt; GraphType, GatherType, MessageType &gt;::procid </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get the id of this process. </p>
<p>The procid is a number between 0 and <a class="el" href="classgraphlab_1_1icontext.html#a67622ed912bfb1bba05b3579b0d1486f">graphlab::icontext::num_procs</a></p>
<dl class="section warning"><dt>Warning:</dt><dd>Each process may have many threads</dd></dl>
<dl class="section return"><dt>Returns:</dt><dd>the process of this machine. </dd></dl>

</div>
</div>
<a class="anchor" id="ab1b5ca81e1c7665a98f4cad04fb0819d"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename GraphType, typename GatherType, typename MessageType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classgraphlab_1_1icontext.html">graphlab::icontext</a>&lt; GraphType, GatherType, MessageType &gt;::signal </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classgraphlab_1_1icontext.html#a16c26ddb8bbbef6c0aa62fcbb1d8157d">vertex_type</a> &amp;&#160;</td>
          <td class="paramname"><em>vertex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classgraphlab_1_1icontext.html#a64f23efbbf13a9421b8efada6966643b">message_type</a> &amp;&#160;</td>
          <td class="paramname"><em>message</em> = <code><a class="el" href="classgraphlab_1_1icontext.html#a64f23efbbf13a9421b8efada6966643b">message_type</a>()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Signal a vertex with a particular message. </p>
<p>This function is an essential part of the GraphLab abstraction and is used to encode iterative computation. Typically a vertex program will signal neighboring vertices during the scatter phase. A vertex program may choose to signal neighbors on when changes made during the previos phases break invariants or warrant future computation on neighboring vertices.</p>
<p>The signal function takes two arguments. The first is mandatory and specifies which vertex to signal. The second argument is optional and is used to send a message. If no message is provided then the default message is used.</p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">vertex</td><td>[in] The vertex to send the message to </td></tr>
    <tr><td class="paramname">message</td><td>[in] The message to send, defaults to <a class="el" href="classgraphlab_1_1icontext.html#a64f23efbbf13a9421b8efada6966643b">message_type()</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a210bf29be5d4216dfda2591aaf42df73"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename GraphType, typename GatherType, typename MessageType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classgraphlab_1_1icontext.html">graphlab::icontext</a>&lt; GraphType, GatherType, MessageType &gt;::signal_vid </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classgraphlab_1_1icontext.html#a1a1817b36be531195eb5bf374cc393ce">vertex_id_type</a>&#160;</td>
          <td class="paramname"><em>gvid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classgraphlab_1_1icontext.html#a64f23efbbf13a9421b8efada6966643b">message_type</a> &amp;&#160;</td>
          <td class="paramname"><em>message</em> = <code><a class="el" href="classgraphlab_1_1icontext.html#a64f23efbbf13a9421b8efada6966643b">message_type</a>()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Send a message to a vertex ID. </p>
<dl class="section warning"><dt>Warning:</dt><dd>This function will be slow since the current machine do not know the location of the vertex ID. If possible use the the <a class="el" href="classgraphlab_1_1icontext.html#ab1b5ca81e1c7665a98f4cad04fb0819d" title="Signal a vertex with a particular message.">icontext::signal</a> call instead.</dd></dl>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">gvid</td><td>[in] the vertex id of the vertex to signal </td></tr>
    <tr><td class="paramname">message</td><td>[in] the message to send to that vertex, defaults to <a class="el" href="classgraphlab_1_1icontext.html#a64f23efbbf13a9421b8efada6966643b">message_type()</a>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a3d9adafb629c9560a8cdb80f94a2583d"></a>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename GraphType, typename GatherType, typename MessageType&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classgraphlab_1_1icontext.html">graphlab::icontext</a>&lt; GraphType, GatherType, MessageType &gt;::stop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Signal the engine to stop executing additional update functions. </p>
<dl class="section warning"><dt>Warning:</dt><dd>The execution engine will stop <em>eventually</em> and additional update functions may be executed prior to when the engine stops. For-example the synchronous engine (see synchronous_engine) will complete the current super-step before terminating. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/api/graphlab2_1_GAS_api/<a class="el" href="graphchi__graphlabv2__1_8hpp_source.html">graphchi_graphlabv2_1.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Jul 5 2012 00:11:20 for GraphChi by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
